package com.yyaccp.hncc.sms.domain;

import java.io.IOException;
import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 排班规则对象 sms_skd_rule
 * 
 * @author ruoyi
 * @date 2020-08-09
 */
public class SmsSkdRule extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** id */
    private Long id;

    /** 状态 */
    @Excel(name = "状态")
    private Integer status;

    /** 操作人id */
    @Excel(name = "操作人id")
    private Long operatorId;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date operateTime;

    /** 规则名 */
    @Excel(name = "规则名")
    private String ruleName;

    /** 描述 */
    @Excel(name = "描述")
    private String description;

    /** 科室id */
    @Excel(name = "科室id")
    private Long deptId;

    private String dept_name;

    private List<SmsSkdRuleItem> smsSkdRuleltemList;
//    public SmsSkdRule() throws IOException {
//
//    }
//    public SmsSkdRule(String json) throws IOException {
//        SmsSkdRule param = new ObjectMapper().readValue(json, SmsSkdRule.class);
//        this.id=param.getId();
//     this.status=param.getStatus();
//     this.operatorId=param.getOperatorId();
//     this.operateTime=param.getOperateTime();
//     this.ruleName=param.getRuleName();
//     this.description=param.getDescription();
//     this.deptId=param.getDeptId();
//     this.dept_name=param.getDept_name();
//     this.smsSkdRuleltemList=param.getSmsSkdRuleltemList();
//    }
    public List<SmsSkdRuleItem> getSmsSkdRuleltemList() {
        return smsSkdRuleltemList;
    }

    public void setSmsSkdRuleltemList(List<SmsSkdRuleItem> smsSkdRuleltemList) {
        this.smsSkdRuleltemList = smsSkdRuleltemList;
    }

    public String getDept_name() {
        return dept_name;
    }

    public void setDept_name(String dept_name) {
        this.dept_name = dept_name;
    }

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setStatus(Integer status) 
    {
        this.status = status;
    }

    public Integer getStatus() 
    {
        return status;
    }
    public void setOperatorId(Long operatorId) 
    {
        this.operatorId = operatorId;
    }

    public Long getOperatorId() 
    {
        return operatorId;
    }
    public void setOperateTime(Date operateTime) 
    {
        this.operateTime = operateTime;
    }

    public Date getOperateTime() 
    {
        return operateTime;
    }
    public void setRuleName(String ruleName) 
    {
        this.ruleName = ruleName;
    }

    public String getRuleName() 
    {
        return ruleName;
    }
    public void setDescription(String description) 
    {
        this.description = description;
    }

    public String getDescription() 
    {
        return description;
    }
    public void setDeptId(Long deptId) 
    {
        this.deptId = deptId;
    }

    public Long getDeptId() 
    {
        return deptId;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("status", getStatus())
            .append("operatorId", getOperatorId())
            .append("operateTime", getOperateTime())
            .append("ruleName", getRuleName())
            .append("description", getDescription())
            .append("deptId", getDeptId())
                .append("smsSkdRuleltemList",getSmsSkdRuleltemList())
            .toString();
    }
}
